* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #5a3928; /* 主色调 */
  --secondary-color: #9a2a2a; /* 强调色 */
  --accent-color: #7d6652; /* 辅助色 */
  --bg-color: #fdf6e3; /* 背景色 */
}

body {
  font-family: '华文楷体', 'LXGW WenKai', cursive;
  background: linear-gradient(160deg, #fff8e1 0%, #f3e9d2 100%);
  min-height: 100vh;
  padding: 16px;
}

/* 主容器 */
.container {
  max-width: 800px;
  margin: 2rem auto;
  background: linear-gradient(175deg, #fffbf6 0%, #f8f1e3 100%);
  border: 3px solid var(--primary-color);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* 标题样式 */
h1 {
  text-align: center;
  color: var(--secondary-color);
  margin: 2rem 0;
  font-size: 2.8em;
  position: relative;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.1);
}

/* 输入区域 */
.input-group {
  margin: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(145deg, #ffffff 0%, #f8f1e3 100%);
  border-radius: 10px;
  border: 2px solid var(--accent-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 输入标签 */
.input-label {
  display: flex;
  align-items: center;
  padding-left: 8px;
  color: var(--primary-color);
  font-size: 1.2em;
}

.input-label::before {
  content: '»';
  margin-top: -0.15em;
  margin-right: 8px;
  color: var(--secondary-color);
  font-size: 1.6em;
}

/* 输入框 */
input[type='number'],
select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  font-size: 1.1em;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

input:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(154, 42, 42, 0.2);
  border-color: var(--secondary-color);
}

/* 按钮样式 */
.button-container {
  text-align: center;
  margin: 2rem 0;
}

button {
  background: linear-gradient(145deg, var(--secondary-color), #7a1f1f);
  color: white;
  padding: 1.2rem 3rem;
  border: none;
  border-radius: 50px;
  font-size: 1.2em;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(154, 42, 42, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(154, 42, 42, 0.4);
}

/* 结果展示 */
.result-container {
  margin: 2rem;
  padding: 2rem;
  background: linear-gradient(150deg, #ffffff 0%, #f8f1e3 100%);
  border-radius: 10px;
  border-left: 6px solid var(--secondary-color);
  animation: fadeIn 0.6s ease;
}

#result {
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 1.1em;
  color: var(--primary-color);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .container {
    margin: 1rem;
    border-radius: 10px;
  }

  h1 {
    font-size: 2rem;
    padding: 0 1rem;
  }

  .input-group {
    margin: 1rem;
    padding: 1rem;
  }
}
